starttime=`cat /var/log/kern.log | grep 'eth0'| awk '{print $3}' | head -1 `
endtime=`cat /var/log/kern.log | grep 'eth0'| awk '{print $3}' | tail -1`

start_hour=`echo $starttime | sed 's/:/ /g' | awk '{print $1}' `
start_min=`echo $starttime | sed 's/:/ /g' | awk '{print $2}' `
start_second=`echo $starttime | sed 's/:/ /g' | awk '{print $3}' `

end_hour=`echo $endtime | sed 's/:/ /g' | awk '{print $1}' `
end_min=`echo $endtime | sed 's/:/ /g' | awk '{print $2}' `
end_second=`echo $endtime | sed 's/:/ /g' | awk '{print $3}' `

#echo $starttime, $endtime, $start_hour, $start_min, $start_second, $end_hour, $end_min, $end_second
#echo a
echo "Number of hours :" $((start_hour-end_hour))
echo "Number of minutes : " $((start_min-end_min))
echo "Number of seconds : " $((start_second-end_second))
chnge 111
